package caip2021p.rcv1;
import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int num = Integer.parseInt(sc.nextLine());
        
        
        // 读取输入行并分割
        String inputLine = sc.nextLine();
        String[] arr = inputLine.split(" ");
        
        HashMap<String, Integer> m = new HashMap<>();
        
        for (int i=0;i<arr.length;i++) {
            if (m.containsKey(arr[i])) {
                m.put(arr[i], m.get(arr[i]) + 1);
                System.out.println("Hi " + arr[i] + "! Glad to see you again!");
            } else {
                m.put(arr[i], 0);
                System.out.println("Hello " + arr[i] + ", how are you?");
            }
        }
        
        
    }
}